package com.fanwei.rocketmq.listner;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author fanwei
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "Tx_Charge_Group_RLT_TEST_TOPIC", selectorExpression = "charge", consumerGroup = "Con_Group_Four")
public class MQTXConsumerLister implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("【MQ消费】用户增加积分成功，userCharge={}", JSONObject.toJSONString(message));
    }
}
